from wtforms import Form,FileField,StringField
from wtforms.validators import InputRequired
#FileRequired：验证上传文件是否为空,FileAllowed：验证上传的文件后缀名
from flask_wtf.file import FileRequired,FileAllowed
class UploadForm(Form):
    file=FileField(validators=[FileRequired(),FileAllowed(['jpg','png','gif'])])